home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / patches / pgs3f.lha / 3.0fUpdate / Macros.LHA / TechReport.rexx < prev   
OS/2 REXX Batch file  |  1994-12-06  |  11KB  |  364 lines

  1. /* $VER: TechReport.rexx 1.0e (6.12.94)
  2.    Copyright 1994 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. /* SAME OLD STUFF */
  6. OPTIONS RESULTS
  7. TRACE OFF
  8. ADDRESS COMMAND
  9. /* Make sure rexx support is opened */
  10. IF ~SHOW('L','rexxsupport.library') THEN
  11.    CALL ADDLIB('rexxsupport.library',0,-30)
  12.  
  13. /* DEFINITIONS AND REPORT SETUP */
  14. ofilename='ram:Report.TEXT'
  15. tfilename='t:Report.TEMP'
  16.  
  17. if ~open(.ofile, ofilename, 'W') then return 9
  18. call writeln(.ofile, 'PAGESTREAM 3.0 TECHNICAL SUPPORT REPORT')
  19. call writeln(.ofile, '---------------------------------------')
  20.  
  21. ADDRESS PAGESTREAM
  22. openbusyrequester message "'Preparing report...'" thermometer enabled abort enabled total 100 current 0
  23. bh=result
  24. ADDRESS COMMAND
  25.  
  26.  
  27. /* MAIN LOOP */
  28. call REGINFO()
  29.     call SETBUSY (2)
  30. call SYSTEMINFO()
  31.     call SETBUSY (5)
  32. call HELPSYSTEM()
  33.     call SETBUSY (8)
  34. call ASSIGNS()
  35.     call SETBUSY (10)
  36. call PROGRAMS()
  37.     call SETBUSY (30)
  38. call LIBS()
  39.     call SETBUSY (35)
  40. call FILTERS()
  41.     call SETBUSY (65)
  42. call EFFECTS()
  43.     call SETBUSY (70)
  44. call PRINTERS()
  45.     call SETBUSY (80)
  46. call ENGINES()
  47.     call SETBUSY (95)
  48. call SPECIAL()
  49. call COLORS()
  50.     call SETBUSY (100)
  51. call CLEANUP(0)
  52.  
  53.  
  54. REGINFO:
  55. call writeln(.ofile, '')
  56. call writeln(.ofile, 'USER INFORMATION:')
  57. if ~open(.tfile, 'PageStream3:PageStream3.prefs', 'R') then rcode=9
  58.     else rcode=0
  59. user.name='Unknown'
  60. user.comp='Unknown'
  61. user.regn='Unknown'
  62. if rcode=0 then do
  63.     do until eof(.tfile)
  64.         temp=(readln(.tfile))
  65.         if left(temp,8)='USERNAME' then user.name=subword(temp,2)
  66.         if left(temp,8)='USERCOMP' then user.comp=subword(temp,2)
  67.         if left(temp,8)='USERREGN' then user.regn=subword(temp,2)
  68.     end
  69.     call close(.tfile)
  70. end
  71. call writeln(.ofile, '  User Name................. '||user.name)
  72. call writeln(.ofile, '  Company................... '||user.comp)
  73. call writeln(.ofile, '  Registration Number....... '||user.regn)
  74. return rcode
  75.  
  76. SYSTEMINFO:
  77. call writeln(.ofile, '')
  78. call writeln(.ofile, 'SYSTEM INFORMATION:')
  79. 'version >'||tfilename
  80. temp=GETTEMP()
  81. call writeln(.ofile, '  '||temp)
  82. 'cpu >'||tfilename
  83. temp=GETTEMP()
  84. call writeln(.ofile, '  '||temp)
  85. call writeln(.ofile, '')
  86. 'avail >'||tfilename
  87. if ~open(.tfile, tfilename, 'R') then return 9
  88. do 4
  89.     temp=readln(.tfile)
  90.     call writeln(.ofile, '  '||temp)
  91. end
  92. call close(.tfile)
  93. return
  94.  
  95. HELPSYSTEM:
  96. call writeln(.ofile, '')
  97. call writeln(.ofile, 'HELP SYSTEM:')
  98. if exists('libs:amigaguide.library') then do
  99.     'version libs:amigaguide.library >'||tfilename
  100.     temp=GETTEMP()
  101.     parse var temp dum ver .
  102.     call writeln(.ofile, '  AmigaGuide.library........ v'||ver)
  103. end
  104. else call writeln(.ofile, '  AmigaGuide.library........ MISSING!')
  105. if exists('sys:Utilities/AmigaGuide') then do
  106.     'version sys:utilities/amigaguide >'||tfilename
  107.     temp=GETTEMP()
  108.     parse var temp dum ver .
  109.     call writeln(.ofile, '  AmigaGuide program........ v'||ver)
  110.     agflag=1
  111. end
  112. else agflag=0
  113. if exists('sys:Utilities/Multiview') then do
  114.     'version sys:utilities/multiview >'||tfilename
  115.     temp=GETTEMP()
  116.     parse var temp dum ver .
  117.     call writeln(.ofile, '  MultiView program......... v'||ver)
  118.     mvflag=1
  119. end
  120. else mvflag=0
  121. if agflag=0 & mvflag=0 then call writeln(.ofile, '  AmigaGuide/Multiview...... MISSING!')
  122. return
  123.  
  124. ASSIGNS:
  125. call writeln(.ofile, '')
  126. call writeln(.ofile, 'ASSIGNS: (AmigaDOS assigns)')
  127.  
  128. /* find out if the softlogik: assign was made */
  129. slassign=showlist('a','SOFTLOGIK')
  130. if slassign=1 then do
  131.     'assign SoftLogik: exists >'||tfilename
  132.     if ~open(.tfile, tfilename, 'R') then return 9
  133.     temp=(readln(.tfile))
  134.     if pos('SOFTLOGIK',upper(temp))~=0 then do
  135.         parse var temp dum line
  136.         line=strip(line,'b')
  137.         call writeln(.ofile, '  SoftLogik................. '||line)
  138.     end
  139.     call close(.tfile)
  140. end
  141. else call writeln(.ofile, '  SoftLogik................. SoftLogik: ASSIGN NOT MADE!')
  142.  
  143. /* find out if the pagestream3: assign was made */
  144. pgsassign=showlist('a','PAGESTREAM3')
  145. if pgsassign=1 then do
  146.     'assign PageStream3: exists >'||tfilename
  147.     if ~open(.tfile, tfilename, 'R') then return 9
  148.     temp=(readln(.tfile))
  149.     if pos('PAGESTREAM3',upper(temp))~=0 then do
  150.         parse var temp dum line
  151.         line=strip(line,'b')
  152.         call writeln(.ofile, '  PageStream3............... '||line)
  153.     end
  154.     call close(.tfile)
  155. end
  156. else call writeln(.ofile, '  PageStream3............... PageStream3: ASSIGN NOT MADE!')
  157.  
  158. /* find out if the fonts assign addition was made */
  159. 'assign fonts: exists >'||tfilename
  160. if ~open(.tfile, tfilename, 'R') then return 9
  161. line=nul
  162. do until eof(.tfile)
  163.     temp=(readln(.tfile))
  164.     if pos('SOFTLOGIK',upper(temp))~=0 & pos('FONTS',upper(temp))~=0 then line=right(temp,length(temp)-pos('+',temp)-1)
  165. end
  166. if line=nul then call writeln(.ofile, '  Fonts..................... SoftLogik:Fonts add ASSIGN NOT MADE!')
  167. call close(.tfile)
  168. call writeln(.ofile, '  Fonts..................... '||line||' add')
  169. return
  170.  
  171. PROGRAMS:
  172. call writeln(.ofile, '')
  173. call writeln(.ofile, 'PROGRAM FILES:')
  174. if exists('PageStream3:PageStream3') then do
  175.     'version PageStream3:PageStream3 full >'||tfilename
  176.     temp=GETTEMP()
  177.     parse var temp dum ver ver2 ver3 .
  178.     if ver3='' then ver2=ver3
  179.     /* for technical reasons, PageStream has version numbers of PageStream3 1.0 instead of PageStream 3.0. Let's make it easier on the user by changing this for the report. */
  180.     ver='3'||right(ver,length(ver)-1)
  181.     if ver2='' then ver2=' '
  182.     call writeln(.ofile, '  PageStream3 program....... v'||ver||' 'ver2)
  183. end
  184. else call writeln(.ofile, '  PageStream3 program....... MISSING!')
  185. if exists('PageStream3:BME') then do
  186.     'version PageStream3:BME >'||tfilename
  187.     temp=GETTEMP()
  188.     parse var temp dum ver ver2 .
  189.     if ver2='' then ver2=' '
  190.     call writeln(.ofile, '  BME program............... v'||ver||' 'ver2)
  191. end
  192. else call writeln(.ofile, '  BME program............... MISSING!')
  193. if exists('PageStream3:PageLiner') then do
  194.     'version PageStream3:PageLiner >'||tfilename
  195.     temp=GETTEMP()
  196.     parse var temp dum ver ver2 .
  197.     if ver2='' then ver2=' '
  198.     call writeln(.ofile, '  PageLiner program......... v'||ver||' 'ver2)
  199. end
  200. else call writeln(.ofile, '  PageLiner program......... MISSING!')
  201. return
  202.  
  203. LIBS:
  204. call writeln(.ofile, '')
  205. call writeln(.ofile, 'SOFTLOGIK:LIBS (program libraries)')
  206. if exists('SoftLogik:Libs/softlogik_app.library') then 'version SoftLogik:Libs/softlogik_app.library >'||tfilename
  207. temp=GETTEMP()
  208. parse var temp dum ver .
  209. call writeln(.ofile, '  softlogik_app.library..... v'||ver)
  210. if exists('SoftLogik:Libs/softlogik_obj.library') then 'version SoftLogik:Libs/softlogik_obj.library >'||tfilename
  211. temp=GETTEMP()
  212. parse var temp dum ver .
  213. call writeln(.ofile, '  softlogik_obj.library..... v'||ver)
  214. if exists('SoftLogik:Libs/slarexxsupport.library') then 'version SoftLogik:Libs/slarexxsupport.library >'||tfilename
  215. temp=GETTEMP()
  216. parse var temp dum ver .
  217. call writeln(.ofile, '  slarexxsupport.library.... v'||ver)
  218. return
  219.  
  220. FILTERS:
  221. call writeln(.ofile, '')
  222. call writeln(.ofile, 'SOFTLOGIK:FILTERS (filter modules)')
  223. if exists('SoftLogik:filters') then do
  224.     call GETFILES('softlogik:filters')
  225.     call SAYVERS('softlogik:filters')
  226.     end
  227. else do
  228.     call writeln(.ofile, '- Filters directory MISSING!')
  229. end
  230. return
  231.  
  232. EFFECTS:
  233. call writeln(.ofile, '')
  234. call writeln(.ofile, 'SOFTLOGIK:EFFECTS (effect modules)')
  235. if exists('SoftLogik:effects') then do
  236.     call GETFILES('softlogik:effects')
  237.     call SAYVERS('softlogik:effects')
  238.     end
  239. else do
  240.     call writeln(.ofile, '- Effects directory MISSING!')
  241. end
  242. return
  243.  
  244. PRINTERS:
  245. call writeln(.ofile, '')
  246. call writeln(.ofile, 'SOFTLOGIK:PRINTERS (printer drivers)')
  247. if exists('SoftLogik:printers') then do
  248.     call GETFILES('softlogik:printers')
  249.     call SAYVERS('softlogik:printers')
  250.     end
  251. else do
  252.     call writeln(.ofile, '- Printers directory MISSING!')
  253. end
  254. return
  255.  
  256. SPECIAL:
  257. call writeln(.ofile, '')
  258. call writeln(.ofile, 'SOFTLOGIK:SPECIAL (miscellaneous modules)')
  259. if exists('SoftLogik:special') then do
  260.     call GETFILES('softlogik:special')
  261.     call SAYVERS('softlogik:special')
  262.     end
  263. else do
  264.     call writeln(.ofile, '- Special directory MISSING!')
  265. end
  266. return
  267.  
  268. ENGINES:
  269. call writeln(.ofile, '')
  270. call writeln(.ofile, 'SOFTLOGIK:ENGINES (font and text code modules)')
  271. if exists('SoftLogik:engines') then do
  272.     call GETFILES('softlogik:engines')
  273.     call SAYVERS('softlogik:engines')
  274.     end
  275. else do
  276.     call writeln(.ofile, '- Engines directory MISSING!')
  277. end
  278. return
  279.  
  280. COLORS:
  281. call writeln(.ofile, '')
  282. call writeln(.ofile, 'SOFTLOGIK:COLORS (color libraries)')
  283. if exists('SoftLogik:colors') then do
  284.     call GETFILES('softlogik:colors')
  285.     call SAYVERS('softlogik:colors')
  286.     end
  287. else do
  288.     call writeln(.ofile, '- Colors directory MISSING!')
  289. end
  290. return
  291.  
  292.  
  293. GETTEMP:
  294.     if ~open(.tfile, tfilename, 'R') then return 9
  295.     temp=readln(.tfile)
  296.     call close(.tfile)
  297. return temp
  298.  
  299. GETFILES:
  300.     parse arg path
  301.     Files=showdir(path,file,'|')
  302.     fLength=length(Files)
  303.     nList=0
  304.     DO WHILE fLength>0
  305.         cLength=pos('|',Files)
  306.         IF cLength=0 then DO
  307.             cLength=FLength+1
  308.             fLength=0
  309.         END
  310.         cFile=left(Files,cLength-1)
  311.         eFile=right(cFile,cLength-lastpos('.',cFile))
  312.         IF eFile~='.info' THEN DO
  313.             nList=nList+1
  314.             List.nList=cFile
  315.         END
  316.         IF FLength~=0 THEN Files=right(Files,fLength-cLength)
  317.         fLength=fLength-cLength
  318.     END
  319. return
  320.  
  321. SAYVERS:
  322.     parse arg path
  323.     do count=1 to nlist
  324.         if right(list.count,5)~='.info' then do
  325.             if upper(right(list.count,8))='FONTLIST' | upper(list.count)='POSTSCRIPT.EHANDLER' | upper(right(list.count,6))='HEADER' | upper(right(list.count,10))='DICTIONARY' | upper(left(list.count,7))='PANTONE' then do
  326.                 'list "'||path||'/'list.count||'" lformat %l >'||tfilename
  327.                 ver=' '||GETTEMP()||' bytes'
  328.             end
  329.             else do
  330.                 'version '||path||'/'||list.count||' >'||tfilename
  331.                 temp=GETTEMP()
  332.                 parse var temp dum ver ver2 .
  333.                 if ver2='' then ver2=' '
  334.                 ver=' v'||ver||' '||ver2
  335.             end
  336.             call writeln(.ofile,substr('  '||list.count,1,28,'.')||ver)
  337.         end
  338.     end
  339. return
  340.  
  341.  
  342. SETBUSY:
  343.     parse arg value
  344.     ADDRESS PAGESTREAM
  345.     setbusyrequester bh current value
  346.     getbusyrequester bh
  347.     if result=1 then call CLEANUP(1)
  348.     ADDRESS COMMAND
  349. return
  350.  
  351.  
  352. CLEANUP:
  353.     parse arg value
  354.     call close(.ofile)
  355.     ADDRESS PAGESTREAM
  356.     closebusyrequester bh
  357.     ADDRESS COMMAND
  358.     if value=0 then do
  359.         'sys:utilities/multiview '||ofilename
  360.         if rc>0 then 'sys:utilities/amigaguide '||ofilename
  361.     end
  362.     'delete '||tfilename||' >NIL:'
  363. exit
  364.